<!DOCTYPE html>
<html lang="en">

  <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>02.异步【非阻塞】</title>
  </head>

  <body>

  </body>
  <script>
    var a = 1;
    var b = 2;
    setTimeout(() => {
      console.log("我是一个延时两秒的函数");
    }, 2000)
    // 这段代码会直接输出3并且等待2秒左右的时间在输出function内部的内容
    console.log(a + b); //3
  </script>

</html>